#ifndef RNG_H
#define RNG_H

#include <random>
#include <chrono>

using namespace std;

class Rng
{
public:
    Rng(double sigma) : _sigma(sigma) {
        unsigned seed = chrono::system_clock::now().time_since_epoch().count();
        _gen = default_random_engine(seed);
        _n = normal_distribution<double>(0, _sigma);
    }

    double next()
    {
        return _n(_gen);
    }

private:
    default_random_engine _gen;
    normal_distribution<double> _n;
    double _sigma;
};

#endif